<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<script type="text/javascript" src="../js/jquery-3.6.0.min.js"></script>
<head>
  <meta charset="UTF-8">
  <title>MyPetStore</title>
  <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css"
        media="screen"/>
  <link rel="StyleSheet" href="../css/searchProduct.css" type="text/css" media="screen"/>
  <link rel="stylesheet" href="../css/mouseEventInform.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="common/IncludeTop">
</div>
<div id="Content">
  <div id="BackLink">
    <a href="/catalog/view">Return to Main Menu</a>
  </div>
  <div id="Catalog">
    <!--th:href="'/catalog/removeItem?workingItemId=' + ${item.getItem().getItemId()-->
    <h2>My Orders</h2>

    <table>
      <tr>
        <th>Order ID</th>
        <th>Date</th>
        <th>Total Price</th>
      </tr>

      <tr th:each="order:${session.orderList}">
        <td>
          <a th:href="'viewOrder?orderId'+${order.orderId}" th:text="${order.orderId}"></a>
        </td>
        <td><th:formatDate th:value="${order.orderDate}"
                           pattern="yyyy/MM/dd " th:text="${order.orderDate}"/></td>
        <td><th:formatNumber th:value="${order.totalPrice}"
                             pattern="$#,##0.00" th:text="${order.totalPrice}"/></td>
      </tr>
    </table>
  </div>
</div>
<div th:replace="common/IncludeBottom">
</div>
</body>
</html>